//SamXIAO
#include <bits/stdc++.h>
using namespace std;

char s1[1086];
void str2arr(string s, char *p)
{
	for(int i=0; i<s.length(); i++) p[i] = s.c_str()[i];
}

void w1()
{
	int cnt = 0, ans = 0, n;
	string st1;
	cin >> st1 ;
	str2arr(st1, s1);
	int l1 = strlen(s1);
	if(l1 >= 3){
		if('i' == s1[l1-3] && 'n' == s1[l1-2] && 'g' == s1[l1-1]){
			s1[l1-3] = 0;
		}
	}

	if(l1 >= 2){
		if(  ('e' == s1[l1-2] && 'r' == s1[l1-1])
			|| ('l' == s1[l1-2] && 'y' == s1[l1-1])
			){
			s1[l1-2] = 0;
		}
	}
	printf("%s", s1);
}

int main()
{
	w1();
  return 0;
}
